package com.weixx.jdbc.controller;

import com.weixx.jdbc.mapper.BookMapper;
import com.weixx.jdbc.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;


import java.util.List;

/**
 * @Auther weixx
 * @Date 2022/1/16
 */
@Controller
public class BookController {
    @Autowired
    private BookMapper bookMapper;

    private List<Book> queryList(){
        List<Book> bookList=bookMapper.queryList();
        for (Book book : bookList) {
            System.out.println(book.toString());
        }
return bookList;
    }

}
